use mongodb::{options::ClientOptions, Client};
use std::sync::Arc;

pub async fn initialize_mongo_client(mongo_uri: &str) -> Arc<Client> {
    let mongo_options = ClientOptions::parse(mongo_uri)
        .await
        .expect("failed to parse mongo options");
    let mongo_client = Client::with_options(mongo_options).expect("mongo failed to connect");
    Arc::new(mongo_client)
}
